#ifndef SGLDBLWINDOW_H
#define SGLDBLWINDOW_H

#include <QtGui/QMainWindow>
#include "Widget.h"
#include <QToolBar>
#include <QRadioButton>
#include <QAction>
#include <QGroupBox>
#include "SetDialog.h"
#include "AboutDialog.h"
#include <QTimer>
#include <QKeyEvent>

class SglDblWindow : public QMainWindow
{
    Q_OBJECT
    Widget mWindow;
    QToolBar* mToolBar;
    QAction* mStartAction;
    QAction* mPauseAction;
    QAction* mStopAction;
    QGroupBox* mGrpBx;
    QRadioButton* mSingleBtn;
    QRadioButton* mDoubleBtn;
    QAction* mSetAction;
    QAction* mAboutAction;
    bool isSingle;
    bool isDouble;
    QLabel mStatuxLbl;
    QTimer mTimer;      //double game timer
    int mTimerSec;
    int mGameTime;
    int mScore1;
    int mScore2;
    int mStatusBarHeight;

    void resetWinSize();

protected slots:
    void onStartBtnClicked();
    void onPauseBtnClicked();
    void onStopBtnClicked();
    void onSetBtnClicked();
    void onAboutBtnClicked();
    void onChangeModeClicked();
    void onCrash(int);
    void onScore(int, int);
    void onTimeOut();
public:
    SglDblWindow(QWidget *parent = 0);
    ~SglDblWindow();
};

#endif // SGLDBLWINDOW_H
